package com.anandsoftware.service;

import com.anandsoftware.application.ApplicationContext;
import com.anandsoftware.db.io.DatabaseIO;
import com.anandsoftware.system.domain.SystemInformation;

public interface AuthenticateService extends BaseService {

	public static final String AUTHENTICATE_SERVICE_REQUEST_URL = ApplicationContext.AUTHENTICATE_SERVICE_REQUEST_URL;

	/**
	 * @param systemInformation
	 *            receives systemInformation to be sent on the server for
	 *            Authentication.
	 * @param key
	 *            key of Encryption Algorithm.
	 * @return true in case of successful Authentication Auth > 2
	 */
	public boolean authenticateOnline(SystemInformation systemInformation,
			String key, String myID);

	/**
	 * @param systemInformation
	 *            receives systemInformation to be checked with database.
	 * @return true in case of successful Authentication Auth > 2
	 */
	public boolean authenticateOffline(SystemInformation systemInformation,
			DatabaseIO dbIO);

	/**
	 * @param systemInformation
	 *            receives systemInformation to be sent on the server for
	 *            Authentication.
	 * @param key
	 *            key of Encryption Algorithm.
	 * @return true in case of successful Authentication Auth > 1
	 */
	public boolean authenticateWeakOnline(SystemInformation systemInformation,
			String key, String myID);

	/**
	 * @param systemInformation
	 *            receives systemInformation to be checked with database.
	 * @return true in case of successful Authentication Auth > 1
	 */
	public boolean authenticateWeakOffline(SystemInformation systemInformation,
			DatabaseIO dbIO);
}
